package com.yangjun.common.enums;

public enum OrderSourceTypeEnum {
	pc("PC网站",1),kefudaixia("客服代下",2),memdian("门店",3),tianmao("天猫",4),paipai("拍拍",5),bayibapingtai("818平台",6),
	babaifang("八百方",7),yaofangwang("药房网",8),yaochengwang("药城网",9),peisongbu("配送部",10),maiyaowang("买药网",11),kad("kad.cn",12),wap("Wap",13),
	android("Android",14),iPhone("IPhone",15),jingdong("京东",16),suning("苏宁",17),dangdang("当当",18),yamaxun("亚马逊",19),
	youzan("有赞微商城",20),weixin("微信商城",21),neigou("内购",22),pifa("批发订单",23),taiantang("太安堂-PC",24),yiyaotong("医药通",25),tianmaorx("天猫RX",26),
	taiantangwap("太安堂-WAP",27),zhuanshuyaoshi("专属药师",28),haoyihaoyao("好医好药",30),sanliulingfeirx("360健康-非Rx",40),
	yihaodian("1号店",41),sanliulingrx("360健康-Rx",42),yihaodianrx("1号店-Rx",48),pinganhaoyisheng("平安好医生",49)
	,duiba("兑吧",50),eyaofang("E+药房",53),eyaofang2("E+药房",99902),yiyaowangotc("壹药网OTC",55),aike("艾客",54)
	,baoxianshangcheng("保险商城",56),yiyaowangrx("壹药网RX",57),taobaobox("TAOBAOBOX",100),shoudongxiadan("DRP手动下单",101),pifadingfou("批发订购",99901),qita("其它",999),
	weizhi("未知",-1);

	private int id;
	private String name;
	
	private OrderSourceTypeEnum(String name,int id) {
		this.id = id;
		this.name = name;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public static String getOrderName(String siteName){
		int id = 0;
		for(OrderSourceTypeEnum orderSourceTypeEnum : OrderSourceTypeEnum.values()){
			if(orderSourceTypeEnum.getName().equals(siteName)){
				id = orderSourceTypeEnum.getId();
			}
		}
		return String.valueOf(id);
	}
	public static OrderSourceTypeEnum getOrderSource(int id){
		switch (id) {
		case 1:return pc;
		case 2:return kefudaixia;
		case 3:return memdian;
		case 4:return tianmao;
		case 5:return paipai;
		case 6:return bayibapingtai;
		case 7:return babaifang;
		case 8:return yaofangwang;
		case 10:return peisongbu;
		case 11:return maiyaowang;
		case 12:return kad;
		case 13:return wap;
		case 14:return android;
		case 15:return iPhone;
		case 16:return jingdong;
		case 17:return suning;
		case 18:return dangdang;
		case 19:return yamaxun;
		case 20:return youzan;
		case 21:return weixin;
		case 23:return pifa;
		case 24:return taiantang;
		case 25:return yiyaotong;
		case 26:return tianmaorx;
		case 27:return taiantangwap;
		case 28:return zhuanshuyaoshi;
		case 30:return haoyihaoyao;
		case 40:return sanliulingfeirx;
		case 41:return yihaodian;
		case 42:return sanliulingrx;
		case 48:return yihaodianrx;
		case 49:return pinganhaoyisheng;
		case 50:return duiba;
		case 100:return taobaobox;
		case 101:return shoudongxiadan;
		case 999:return qita;
		case 99901:return pifadingfou;
		case 53:return eyaofang;
		case 99902:return eyaofang2;
		case 55:return yiyaowangotc;
		case 54:return aike;
		case 56:return baoxianshangcheng;
		case 57:return yiyaowangrx;
		default:
			return weizhi;
		}
	}
	
	
}
